package com.jeethink.subject.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.jeethink.subject.mapper.SysSubjectMapper;
import com.jeethink.subject.domain.SysSubject;
import com.jeethink.subject.service.ISysSubjectService;
import com.jeethink.common.core.text.Convert;

/**
 * 课题管理Service业务层处理
 *
 * @author Xianlu Tech
 * @date 2020-04-23
 */
@Service
public class SysSubjectServiceImpl implements ISysSubjectService {
    @Autowired
    private SysSubjectMapper sysSubjectMapper;

    /**
     * 查询课题管理
     *
     * @param id 课题管理ID
     * @return 课题管理
     */
    @Override
    public SysSubject selectSysSubjectById(Long id) {
        return sysSubjectMapper.selectSysSubjectById(id);
    }

    /**
     * 查询课题管理列表
     *
     * @param sysSubject 课题管理
     * @return 课题管理
     */
    @Override
    public List<SysSubject> selectSysSubjectList(SysSubject sysSubject) {
        return sysSubjectMapper.selectSysSubjectList(sysSubject);
    }

    /**
     * 新增课题管理
     *
     * @param sysSubject 课题管理
     * @return 结果
     */
    @Override
    public int insertSysSubject(SysSubject sysSubject) {
        return sysSubjectMapper.insertSysSubject(sysSubject);
    }

    /**
     * 修改课题管理
     *
     * @param sysSubject 课题管理
     * @return 结果
     */
    @Override
    public int updateSysSubject(SysSubject sysSubject) {
        return sysSubjectMapper.updateSysSubject(sysSubject);
    }

    /**
     * 删除课题管理对象
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteSysSubjectByIds(String ids) {
        return sysSubjectMapper.deleteSysSubjectByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除课题管理信息
     *
     * @param id 课题管理ID
     * @return 结果
     */
    @Override
    public int deleteSysSubjectById(Long id) {
        return sysSubjectMapper.deleteSysSubjectById(id);
    }
}
